package com.wait.onlinepicture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wait.onlinepicture.model.dto.comment.CommentAddRequest;
import com.wait.onlinepicture.model.dto.comment.CommentQueryRequest;
import com.wait.onlinepicture.model.dto.comment.CommentReviewRequest;
import com.wait.onlinepicture.model.entity.PictureComment;
import com.wait.onlinepicture.model.entity.User;
import com.wait.onlinepicture.model.vo.CommentVO;

import java.util.List;

/**
 * author Wait葡萄成熟时
 * description 针对表【picture_comment(图片评论)】的数据库操作Service
 * createDate 2025-09-26 14:00:00
 */
public interface CommentService extends IService<PictureComment> {

    /**
     * description 创建评论
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    long addComment(CommentAddRequest commentAddRequest, User loginUser);

    /**
     * description 删除评论
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    boolean deleteComment(long id, User loginUser);

    /**
     * description 审核评论
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    boolean reviewComment(CommentReviewRequest commentReviewRequest, User loginUser);

    /**
     * description 获取评论VO
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    CommentVO getCommentVO(PictureComment pictureComment);

    /**
     * description 获取评论VO列表
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    List<CommentVO> getCommentVOList(List<PictureComment> pictureCommentList);

    /**
     * description 分页获取评论列表
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    List<CommentVO> listCommentVOByPage(CommentQueryRequest commentQueryRequest);

    /**
     * description 用于将查询请求转为 QueryWrapper 对象的方法
     * author Wait葡萄成熟时
     * date 下午2:00 2025/9/26
     */
    QueryWrapper<PictureComment> getQueryWrapper(CommentQueryRequest commentQueryRequest);
}